﻿using System;
using System.Web.UI.WebControls;
using BLL;

public partial class StatisticData_InterimStatistic_PRbyUID : System.Web.UI.Page
{
    private DateTime starttime
    {
        get { return DateTime.Parse(ViewState["starttime"].ToString()); }
        set { ViewState["starttime"] = value; }
    }
    private DateTime stoptime
    {
        get { return DateTime.Parse(ViewState["stoptime"].ToString()); }
        set { ViewState["stoptime"] = value; }
    }

    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void Button1_Click(object sender, EventArgs e)
    {
        starttime = DateTime.Parse(this.TextBox1.Value.Trim());
        stoptime = DateTime.Parse(this.TextBox2.Value.Trim());
        BindPR(starttime, stoptime);
    }

    private void BindPR(DateTime starttime,DateTime stoptime)
    {
        Interim test = new Interim();
        GridView2.DataSource = test.GetDebug_PRbyUID_DT(starttime, stoptime);
        GridView2.DataBind();
        GridView2.Visible = true;
    }

    protected void GridView2_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        this.GridView2.PageIndex = e.NewPageIndex;
        BindPR(starttime, stoptime);
    }
}
